package com.ruoyi.aitcommon.vo;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.ruoyi.aitcommon.utils.AITConst;

/**
 * 流程上下文VO
 * @author Administrator
 *
 */
public class FlowContextVO {
	//流程ID
	private Long flowID=0L;
	private String flowCode="";
	//流程名称
	private String flowName="";
	//流程开始时间
	private Date startDate=new Date();
	//流程结束时间
	private Date endDate=new Date();
	//流程耗时
	private Long timeConsume=0l;
	//流程处理成功记录数
	private Long successCnt=0l;
	//流程处理失败记录数
	private Long errorCnt=0l;
	//流程执行简报
	private List<String> bulletin=new ArrayList<String>();
	//流程返回码
	private String retCode=AITConst.SUCCESSCODE;
	
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public Long getTimeConsume() {
		return timeConsume;
	}

	public void setTimeConsume(Long timeConsume) {
		this.timeConsume = timeConsume;
	}
	
	public String getBulletinStr() {
		StringBuilder sb=new StringBuilder();
		sb.append("Flow简报 \r\n");
		for(String str:this.bulletin) {
			sb.append(str+" \r\n");
		}
		return sb.toString();
	}
	
	public Long getFlowID() {
		return flowID;
	}
	public void setFlowID(Long flowID) {
		this.flowID = flowID;
	}
	public String getFlowName() {
		return flowName;
	}
	public void setFlowName(String flowName) {
		this.flowName = flowName;
	}
	public Date getStartDate() {
		return startDate;
	}
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	public Long getSuccessCnt() {
		return successCnt;
	}
	public void setSuccessCnt(Long successCnt) {
		this.successCnt = successCnt;
	}
	public Long getErrorCnt() {
		return errorCnt;
	}
	public void setErrorCnt(Long errorCnt) {
		this.errorCnt = errorCnt;
	}
//	public List<String> getBulletin() {
//		return bulletin;
//	}
	public void addBulletin(String msg) {
		bulletin.add(msg);
	}
//	public void setBulletin(List<String> bulletin) {
//		this.bulletin = bulletin;
//	}
	@Override
	public String toString() {
		return "FlowContextVO [flowID=" + flowID + ", flowName=" + flowName + ", startDate=" + startDate
				+ ", successCnt=" + successCnt + ", errorCnt=" + errorCnt + ", bulletin=" + bulletin + "]";
	}
	public String getRetCode() {
		return retCode;
	}
	public void setRetCode(String retCode) {
		this.retCode = retCode;
	}
	public String getFlowCode() {
		return flowCode;
	}
	public void setFlowCode(String flowCode) {
		this.flowCode = flowCode;
	}
}
